package com.huawei.codearts.config;

import com.huawei.codearts.service.OrderService;
import com.huawei.codearts.service.UserServiceImpl;
import com.huawei.codearts.tools.aop.TransactionAspect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy
public class AopConfig {

    @Bean
    public UserServiceImpl userServiceImpl() {
        return new UserServiceImpl();
    }

    @Bean
    public OrderService orderService() {
        return new OrderService();
    }

    @Bean
    public TransactionAspect transactionAspect() {
        return new TransactionAspect();
    }
}
